<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>		
		<?php echo $title_for_layout; ?>
	</title>
	
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css(array('bootstrap','docs','font-awesome','backend','bootstrap-datetimepicker'));	 
		echo $this->Html->script(array('jquery','bootstrap','docs','moment','bootstrap-datetimepicker'));	 	
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');		
		
	?>
	
	
</head>
    
 <?php
    if ($this->request['controller'] == "questions"){ $questions = "active"; }
    if ($this->request['controller'] == "answers"){ $answers = "active"; }
    if ($this->request['controller'] == "users"){ $users = "active"; }
    if ($this->request['controller'] == "reports"){ $reports = "active"; }
    if ($this->request['admin']){ $admin = "active"; }
    if ($this->request['controller'] == "users"){ $users = "active"; }
    if ($this->request['controller'] == "groups"){ $groups = "active"; }
    if ($this->request['admin'] || $this->request['controller'] == "users" || $this->request['action'] == "login" || $this->request['action'] == "logout"){ $login = "active"; }

	
 ?>   
<body class="Pages display">
    
    <nav class="navbar navbar-default" role="navigation">
		<div class="container navbar-collapse">
			<div class="navbar-header dropdown-toggle">
			   <a class="navbar-brand" data-toggle="dropdown" href="#"><i style="color:red;" class="glyphicon glyphicon-th"></i></a>
			   <!--ul class="dropdown-menu" style="width:40%">	
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-database"></i> Administration</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-users"></i> Nhom quyen</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Tai khoan quan tri</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-cog"></i> Cau hinh site</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Chuyen muc</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Tin tuc</a></li>
						
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> San pham</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Quan ly file</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Doi tac</a></li>
						<li style="width:50%;float:left;" ><a href="#"><i class="fa fa-user"></i> Quang cao</a></li>
				</ul-->
			</div>
			<ul class="nav navbar-nav navbar-nav-left">
                            <li class="<?php echo @$users; ?>"><a href="/users">Thành viên quản trị</a></li>
                            <li class="<?php echo @$questions; ?>"><a href="/questions">Câu hỏi</a></li>
                            <li class="<?php echo @$answers; ?>"><a href="/answers">Đáp án</a></li>
                            <li class="<?php echo @$reports; ?>"><a href="/reports">Thống kê</a></li>
				<!--li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">Thống kê <b class="caret"></b></a>
					<ul class="dropdown-menu">						
						<li class="divider"></li>
						<li><a href="#">Separated link</a></li>
						<li class="divider"></li>
						<li><a href="#">One more separated link</a></li>
					</ul>
				</li-->
			</ul>
			
			<ul class="nav navbar-nav navbar-right">
				<li><a href="/users/logout"><i class="fa fa-sign-out"></i>Logout</a></li>
				
			</ul>
		</div><!-- /.navbar-collapse -->
	</nav>
<div class="container">
	<?php echo $this->fetch('content'); ?>
</div>
<?php //echo $this->element('sql_dump'); ?>
</body>
</html>
